package date;

import java.text.SimpleDateFormat;
import java.util.Date;

public class MyDate {
    public static void main(String[] args) {
        Date date = new Date();
//        System.out.println(date);
//        System.out.println(new Date(System.currentTimeMillis() + 1000 * 60));
//        System.out.println(date.getTime());
//        System.out.println(System.currentTimeMillis());
//        String pattern = "yyyy年MM/dd hh时mm分ss秒 sss";
//        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
//        System.out.println(getDate(pattern, date));
//        String aa = "yyyy年MM月";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat();
        System.out.println(simpleDateFormat.format(date));
//        System.out.println(getDate(aa, date));
//        String strDate = getDate(pattern, date);
    }

    private static String getDate(String pattern, Date date) {
//        String pattern = "yyyy年MM/dd hh时mm分ss秒 sss";
        SimpleDateFormat simpleDateFormat = new SimpleDateFormat(pattern);
        return simpleDateFormat.format(date);
    }
}
